<script lang="ts" setup>
import {reactive} from "vue";

const emit = defineEmits([ 'close' ])
const props = defineProps({
  source: {
    type: Array,
    default: () => {
      return []
    }
  },

  isLoading: {
    type: Boolean,
    default: false
  },
  valueField: {
    type: String,
    default: 'name'
  },
  labelField: {
    type: String,
    default: 'label'
  },
  showClose: {
    type: Boolean,
    default: false
  },
  maxWidth: {
    type: Number,
    default: 92
  },
  type:{
    type: String,
    default: ""
  }
})

</script>

<template>
  <el-radio-group style="margin-bottom: 30px">
    <el-radio-button v-for="item of source"
                     :value="item[valueField]" >{{item[labelField]}}</el-radio-button>
  </el-radio-group>
</template>

<style scoped lang="scss">
.tab-container{
  flex:none;
  width:100%;
  height:40px;
  overflow: hidden;
  position:relative;
}

.control-box{
  @include hor-group(end);
  position:absolute;
  right:0;
  height:100%;
}

</style>